<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>狂神说</title>
    <!--1.导入vue.js-->
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js"></script>

</head>
<body>

<div id="app">

    <qinjiang v-for="item in items" v-bind:qin="item"></qinjiang>

</div>

<script>
    //定义一个Vue组件component
    Vue.component("qinjiang",{
        props: ['qin'],
        template: "<li>{{qin}}</li>"
    });

    let app = new Vue({
        el: '#app',
        data: {
            items: ["Java","Linux","前端"]
        },
        methods: {//所有方法定义在methods里面
        }
    });

</script>

</body>
</html>